import { createApp } from 'vue';

import App from './App.vue';
import { setupRouter } from '@/router';
import { setupStore } from '@/store';

import { setupHttp } from '@/common/http';
import { setupMessageModel } from '@/common/message';
import { setupLoading } from '@/common/loading';
import { setupDirective } from '@/directive';
import { setupPlugins } from '@/plugins';

import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/reset.css';

import JsonViewer from 'vue-json-viewer';
import '@/styles/jsonViewer.scss';

import Froala from '@/components/custom/editor/Froala.js';

import '@/styles/style.scss';
import '@/styles/theme.scss';

const app = createApp(App);

app.use(Antd);
app.use(JsonViewer);
app.use(Froala);

setupStore(app);
setupRouter(app);

setupHttp(app);
setupLoading(app);
setupMessageModel();

setupDirective(app);
setupPlugins(app);

app.mount('#app');
